Merge main into rail generator v1.#91
Merged
Merged
Conversation
…load and thread-safety fixes - Add optional offline country/region lookup using alpslib-geo RgcHandler - Automatically download and cache RGC database on first run from configured URL - Fall back to online Photon/Komoot API if local database disabled or unavailable - Mark rgcHandler field as volatile to guarantee cross-thread visibility - Mark Module.enabled as volatile to ensure reliable isEnabled() checks across threads - Schedule RgcHandler creation and all method calls on main thread to prevent concurrent access - Create parent directories before FileOutputStream to handle first-run download - Use try-with-resources for download streams to prevent resource leaks - Schedule RGC lookups on main thread when called from worker threads in OpenStreetMapAPI - Add getCCA2FromCountryName() fallback helper for country code lookup - Add RGC configuration options: enabled, url, path under reverse-geocode.local-database - Handle download failures gracefully with logging and fallback to API Dependencies: - Add com.alpsbte.alpslib:alpslib-geo:1.0.0 Files: - build.gradle.kts: add alpslib-geo dependency - gradle/libs.versions.toml: define alpslib-geo version - settings.gradle.kts: enable mavenLocal() (TEMPORARY - disable before merge) - NavigationModule.java: add RGC initialization with auto-download - Module.java: mark enabled field volatile - OpenStreetMapAPI.java: schedule RGC lookups on main thread - NavUtils.java: add getCCA2FromCountryName() helper - ConfigPaths.java: add RGC_LOCAL_DB_* constants - WarpsComponent.java, WarpEditMenu.java: use fallback country code lookup - config.yml: document RGC local-database settings
Address PR review by splitting RGC setup, region lookup, and OpenStreetMap country resolution into focused methods and switch-based flows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR meant to make the rail gen v1 branch up to date with main.